package org.barad.architecture.analyzer.archpad.xml.handler;

/**
 * This class encapsulates the description of an ArchPad component.
 * 
 * @author svetoslavganov@gmail.com (Svetoslav R. Ganov)
 *
 */
public class ComponentDescriptor {
	private String className;
	private String iconName;
	private String toolTipText;
	private boolean linkMandatory;
	
	/**
	 * Creates a new instance.
	 * 
	 * @param className The name of the class that represents the component.
	 * @param iconName The name of the icon used to visualize the component.
	 * @param toolTipText A tool top text to be shown during hovering over the component.
	 * @param linkMandatory If this component should be one of the sides in a relationship i.e. link.
	 */
	public ComponentDescriptor(String className, String iconName, String toolTipText, 
			boolean linkMandatory) {
		this.className = className;
		this.iconName = iconName;
		this.toolTipText = toolTipText;
		this.linkMandatory = linkMandatory;
	}
	
	/**
	 * Gets the component class name.
	 * 
	 * @return The class name.
	 */
	public String getClassName() {
		return className;
	}
	
	/**
	 * Sets the component class name.
	 * 
	 * @param className The class name.
	 */
	public void setClassName(String className) {
		this.className = className;
	}
	
	/**
	 * The component icon name.
	 * 
	 * @return The icon name.
	 */
	public String getIconName() {
		return iconName;
	}
	
	/**
	 * Sets the component class name.
	 * 
	 * @param iconName The class name.
	 */
	public void setIconName(String iconName) {
		this.iconName = iconName;
	}
	
	/**
	 * Gets the tool tip text.
	 * 
	 * @return The tool tip text.
	 */
	public String getToolTipText() {
		return toolTipText;
	}
	
	/**
	 * Sets the tool tip text.
	 * 
	 * @param toolTipText The tool tip text.
	 */
	public void setToolTipText(String toolTipText) {
		this.toolTipText = toolTipText;
	}

	/**
	 * Gets if the link is mandatory.
	 * 
	 * @return If the link is mandatory.
	 */
	public boolean isLinkMandatory() {
		return linkMandatory;
	}

	/**
	 * Sets if the link is mandatory.
	 * 
	 * @param linkMandatory If the link is mandatory.
	 */
	public void setLinkMandatory(boolean linkMandatory) {
		this.linkMandatory = linkMandatory;
	}
}
